<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>"> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>万达营销流程管理系统</title>
<link href="<%=basePath %>/css/css.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="js/ie6png.js" ></script>
<script type="text/javascript">
DD_belatedPNG.fix('div,ul,li,a,p,img,body,dl,dt,dd');</script>
<![endif]-->
<!-- <script src="jquery-1.11.0.js"></script> -->
<script src="<%=basePath %>/scripts/jquery.js" type="text/javascript"></script>
<script type="text/javascript">

	function MM_jumpMenu(targ, selObj, restore) { //v3.0
		eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value
				+ "'");
		if (restore)
			selObj.selectedIndex = 0;
	}
</script>
<script>
<!--
	/*第一种形式 第二种形式 更换显示样式*/
	function setTab(name, cursel, n) {
		for (i = 1; i <= n; i++) {
			var menu = document.getElementById(name + i);
			var con = document.getElementById("con_" + name + "_" + i);
			menu.className = i == cursel ? "hover" : "";
			con.style.display = i == cursel ? "block" : "none";
		}
	}

	function CheckAll(thisform) {
		for ( var i = 0; i < thisform.elements.length; i++) {
			var e = thisform.elements[i];
			if (e.Name != "chkAll" && e.disabled != true)
				e.checked = thisform.chkAll.checked;
		}
	}

	function deleteBatch() {
		var checkedNum = $("input[name='checkbox2']:checked").length;
		if (checkedNum == 0) {
			alert("请至少选择一项!");
			return false;
		}
		if (confirm("确定删除所选项目?")) {
			var checkedList = new Array();
			$("input[name='checkbox2']:checked").each(function() {
				checkedList.push($(this).val());
			});
			
			$.ajax({
				type:"POST",
				url:"openingreport/deleteBatch.do",
				data:{
					"ids":checkedList
				},
				dataType:"json",
				success:function(data) {
					$("[name='checkbox3']:checkbox").attr("checked",false);
					alert('删除成功!');
					setTimeout("location.reload()", 100);//页面刷新
				},
				error:function(data) {
					alert('删除失败!');
					setTimeout("location.reload()", 100);//页面刷新
				}
			});
		}

	}
//-->
</script>
</head>
<body style="background:#fff;">
<br />
<div style="width:1000px;" class="tbox01 boxcenter">
  <div class="tbox02">
    <dl>
      <dt></dt>
      <dd>
      
        <div class="tbox02menu">
          <ul>
            <li><a href="javascript:void(0)" onclick="deleteBatch()">删除</a></li>
            <li><a href="openingreport/add.do">新增</a></li>
          </ul>
        </div>
      </dd>
    </dl>
  </div>
  <div class="tbox03">
    <div class="tbox04a">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="47%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr align="left" valign="top">
                <td><img src="images/op5_1.gif" /></td>
                <td class="ybox08td2"><ul>
                    开盘报告列表
                  </ul></td>
                <td class="ybox08td3"></td>
                <td><img src="images/op5_4.gif" /></td>
              </tr>
            </table>
            <div class="ybox08div">
              <div class="tbox05 margb7">
                <dl>
                  <dt>
                  <form action="openingreport/selectLike.do" method="post">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="85" height="25" align="center" style=" padding-right:5px;">开盘报告名称：</td>
                        <td style=" padding-right:15px;"><input name="title" type="text"  class="black12" id="title" style="width:30%;" /></td>
                        <td width="75" height="25" align="center" style=" padding-right:5px;">审核：</td>
                        <td style=" padding-right:15px;">
                        	<select name="state" id="state" style="width: 90%;">
                        		<option selected="selected" value="">全部</option>
                        		<option  value="已审核">已审核</option>
                        		<option value="未审核">未审核</option>
                    		<select>
                        </td>
                        <td width="62" rowspan="2"><div ><input type="submit" class="button26h" value="查询"></div></td>
                      </tr>

                    </table>
                    </form>
                  </dt>
                </dl>  
              </div>
              <form action="" method="post">
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="ybox06table">
                <tr>
                  <td width="30" class="ybox06td01"><input type="checkbox" name="chkAll" id="checkbox" onclick="CheckAll(this.form)"/></td>
                  <td width="30" class="ybox06td01">序号</td>
                  <td class="ybox06td01">开盘报告名称</td>
                  <td class="ybox06td01">状态</td>
                  <td class="ybox06td01">操作</td>
                </tr>
                <c:forEach items="${listopening }" var="list">
                <tr>
                  <td class="ybox06td02wcenter"><input type="checkbox" name="checkbox2" id="checkbox" value="${list.id }" /></td>
                  <td class="ybox06td02wcenter">${list.id }</td>
                  <td class="ybox06td02wleft">${list.title }</td>
                  <td class="ybox06td02wcenter">${list.state }</td>
                  <td class="ybox06td02wcenter">查看</td>
                </tr>
                </c:forEach>
              </table>
              <div class="nums boxcenter black12">
              <a href="openingreport/selectOpeningFY.do?dangqian=0&sx=0" class="hovera">首 页</a>
              <a href="openingreport/selectOpeningFY.do?dangqian=${dangqian }&sx=1">上一页</a>
              <a href="openingreport/selectOpeningFY.do?dangqian=${dangqian }&sx=2">下一页</a>
              <a href="openingreport/selectOpeningFY.do?dangqian=-1&sx=0">尾 页</a>&nbsp;&nbsp;第${dangqian }/${zongye }页&nbsp;共${count-1 }条&nbsp;&nbsp;
            </div></td>
          
        </tr>
      </table>
      </form>
    </div>
  </div>
</div>
</body>
</html>